Skip to content

Topic/improve layout upload#5912

Merged
lukasmueller merged 19 commits intomasterfrom
topic/improve_layout_upload
Mar 2, 2026
Merged

Topic/improve layout upload#5912
lukasmueller merged 19 commits intomasterfrom
topic/improve_layout_upload

Conversation

@ryan-preble
Copy link
Contributor

Description

Changes the spatial layout to use the general file parser. Also enables spatial layouts to be reuploaded.

Closes #5838

Checklist

  • Refactoring only
  • Documentation only
  • Fixture update only
  • Bug fix
    • The relevant issue has been closed.
    • Further work is required.
  • New feature
    • Relevant tests have been created and run.
    • Data was added to the fixture
      • Data was added via a patch in /t/data/fixture/patches/.
    • User-Facing Change
      • The user manual in /docs has been updated.
    • Any new Perl has been documented using perldoc.
    • Any new JavaScript has been documented using JSDoc.
    • Any new legacy JavaScript has been moved from /js to /js/source/legacy.

@dwaring87
Copy link
Member

The upload does not seem to be storing the new coordinates correctly:

This file:
image

Generates this layout:
image

@ryan-preble
Copy link
Contributor Author

The upload does not seem to be storing the new coordinates correctly:

I had that happen to me once but it I redid it with the same file and it worked fine on the second attempt. I initially wrote it off because of that, but if you send me that file I will see if I can reproduce it more consistently

@dwaring87
Copy link
Member

dwaring87 commented Feb 23, 2026

This is a trial that already had a layout and I went to directly upload a new layout (didn't delete the existing layout first). It looks like the trial layout json is still retaining it's previous row/col positions. This is one of the plots:

"210": {
    "plot_number": "210",
    "col_number": "10,5,4",
    "tissue_sample_names": [],
    "plants_tissue_sample_names": {},
    "accession_id": 704157,
    "plant_index_numbers": [
      "1"
    ],
    "rep_number": "2",
    "plot_name": "SAMPLE_EXANY_AV_2022-PLOT_210",
    "plant_ids": [
      704425
    ],
    "tissue_sample_ids": [],
    "accession_name": "AV22-1002",
    "row_number": "2,5",
    "tissue_sample_index_numbers": [],
    "block_number": "2",
    "plant_names": [
      "SAMPLE_EXANY_AV_2022-PLOT_210_plant_1"
    ],
    "plot_id": 704386
  },

There are still multiple stock props in the DB for the plot for row and col position.

Here's the file I uploaded, if that's helpful: planting_order_6608.csv

Copy link
Member

@dwaring87 dwaring87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to update_or_create on the stockprops fixes the issue

@lukasmueller
Copy link
Member

The upload works but the trial view was not updated automatically in my case (or maybe I didn't wait long enough???)

@ryan-preble
Copy link
Contributor Author

The upload works but the trial view was not updated automatically in my case (or maybe I didn't wait long enough???)

I can add a page refresh after the upload is complete

@dwaring87 dwaring87 self-requested a review March 2, 2026 13:01
Copy link
Member

@dwaring87 dwaring87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the refresh works well

Copy link
Member

@lukasmueller lukasmueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-)

@lukasmueller lukasmueller merged commit 553579e into master Mar 2, 2026
11 checks passed
@lukasmueller lukasmueller deleted the topic/improve_layout_upload branch March 2, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upload spatial layout does not work -> fixed

3 participants